package xcmg.device.dao.mapper.warehouse;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.warehouse.WarehouseAreaDO;
import java.util.List;

@Mapper
public interface WarehouseAreaDOMapper {
    int deleteByAreaId(@Param("warehouseAreaId") String warehouseAreaId);

    int insert(WarehouseAreaDO record);
    
    int insertDirect(WarehouseAreaDO record);

    int countByWarehouseAreaId(@Param("warehouseId") String warehouseId, @Param("areaCode") String areaCode);

    List<WarehouseAreaDO> list(@Param("warehouseId") String warehouseId);
    
    List<WarehouseAreaDO> listAbleInfos(@Param("warehouseId") String warehouseId);
    
	/**根据仓库编码和是否受停用状态控制查询库区*/
	List<WarehouseAreaDO> listStopUsingControl(@Param("warehouseId") String warehouseId,@Param("stopUsingControl") Integer stopUsingControl);

    List<WarehouseAreaDO> moreAreaList(@Param("warehouseIds") List<String> warehouseIds);

    WarehouseAreaDO itemByCode(@Param("orgId")String orgId,@Param("areaCode")String areaCode,@Param("warehouseId")String warehouseId);

    WarehouseAreaDO selectWarhouse(@Param("WarehouseAreaId") String WarehouseAreaId,@Param("OrgId")String OrgId);

    WarehouseAreaDO findDirectArea(@Param("OrgId")String OrgId);
    
    int updateStopUsing(@Param("id") String id,@Param("stopUsing") Integer stopUsing);
    
    WarehouseAreaDO getInfoByArea(@Param("OrgId") String OrgId, @Param("areaCode") String areaCode);

    String findAreaId(@Param("orgId")String orgId, @Param("warehouseCode")String warehouseCode, @Param("areaCode") String areaCode);
}
